<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <title>优标检测网</title>
    <!-- 浏览器上显示title 图标 icon图标 -->
	<link type="image/x-icon" rel="icon" href="<%=basePath %>resource/img/minilogo.png">

	<!-- 如果想让图标出现在收藏夹中，就：  -->
	<link type="image/x-icon" rel="shortcut icon" href="<%=basePath %>resource/img/minilogo.png">
	<link type="image/x-icon" rel="bookmark" href="<%=basePath %>resource/img/minilogo.png">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="优标">
	<meta http-equiv="description" content="优标">
    <link href="<%=basePath %>portal/css/main.css" type="text/css" rel="stylesheet">
    <link href="<%=basePath %>portal/css/datepickerbootstrap.css" type="text/css" rel="stylesheet">
    <title>上传质量控制</title>
</head>
<body>
<%@include file="p_head.jsp"%>
<div class="NCContent">
    <div class="NCNewsHead">
        <div class="MainPage">
            <div class="NCMain">
                <h2 class="NCHeadWord">质量控制 / Quality Control</h2>
            </div>
        </div>
    </div>
    <div class="NCNewsList">
        <div class="MainPage">
            <div class="NCMain">
                <div class="NCNewsListContent">
                    <div class="QCTitleContentHead">发起质量控制</div>
                    <div class="QCCreateBody">
                    	<form action="<%=basePath%>qualitycontrol_doCreate.action" method="post" id="qualityCtrlForm" enctype="multipart/form-data">
                        <div class="QCCreateContent">
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">项目名称</div>
                                <div class="QCCreateMain"><input class="QCCName" type="text" id="projectName" name="projectName"/>
                                <span style="display:none" class="RegMsg">*项目名称不能为空</span></div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">所属领域</div>
                                <div class="QCCreateMain">
                                    <select class="QCCTag" name="field" id="field">
                                        <c:forEach var="field" items="${qcFieldStr}">
                                        	<option value="${field.dicKey}">${field.dicValue}</option>
										</c:forEach>
                                    </select>
                                </div>
                                <div class="QCCreateHeadWord2">活动性质</div>
                                <div class="QCCreateMain">
                                    <select class="QCCTag" name="nature" id="nature">
                                        <c:forEach var="nature" items="${qcNatureStr}">
                                        	<option value="${nature.dicKey}">${nature.dicValue}</option>
										</c:forEach>
                                    </select>
                                </div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">参加范围</div>
                                <div class="QCCreateMain">
                                    <select class="QCCTag" name="scope" id="scope">
                                        <c:forEach var="scope" items="${qcScopeStr}">
                                        	<option value="${scope.dicKey}">${scope.dicValue}</option>
										</c:forEach>
                                    </select>
                                </div>
                                <div class="QCCreateHeadWord2">参加数量</div>
                                <div class="QCCreateMain">
                                    <select class="QCCTag" name="count" id="count">
                                        <c:forEach var="count" items="${qcCountStr}">
                                        	<option value="${count.dicKey}">${count.dicValue}</option>
										</c:forEach>
                                    </select>
                                </div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">开始时间</div>
                                <div class="QCCreateMain">
                                    <input id="beginDate" name="beginDate" value='<fmt:formatDate value="${beginDate}" 
                                    pattern="yyyy-MM-dd"/>' class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
                                    style="width:198px">
                                    <span style="display:none" class="RegMsg">*开始时间不能为空</span>
                                </div>
                                <div class="QCCreateHeadWord2">价格</div>
                                <div class="QCCreateMain">
                                    <input class="QCCStandard" type="text" id="price" name="price"/>
                                    <span style="display:none" class="RegMsg">*价格不能为空</span>
                                </div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">结束时间</div>
                                <div class="QCCreateMain">
                                    <input id="endDate" name="endDate" value='<fmt:formatDate value="${endDate}" 
                                    pattern="yyyy-MM-dd"/>' class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
                                    style="width:198px">
                                    <span style="display:none" class="RegMsg">*结束时间不能为空</span>
                                </div>
                                <div class="QCCreateHeadWord2">反馈时间</div>
                                <div class="QCCreateMain">
                                    <input id="feedBackDate" name="feedBackDate" value='<fmt:formatDate value="${feedBackDate}" 
                                    pattern="yyyy-MM-dd"/>' class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
                                    style="width:198px">
                                    <span style="display:none" class="RegMsg">*反馈时间不能为空</span>
                                </div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1">检测标准</div>
                                <div class="QCCreateMain">
                                    <input class="QCCStandard" type="text" name="standard" id="standard"/>
                                    <span style="display:none" class="RegMsg">*检测标准不能为空</span>
                                </div>
                            </div>
                            <div class="QCCreateBox">
                                <div class="QCCreateHeadWord1"></div>
                                <span>公布组织机构信息</span><input type="checkbox" name="gbjgxx" id="gbjgxx"/>
                                <span>平台数据处理</span><input type="checkbox" name="ptclsj" id="ptclsj"/>
                                <span>平台协助</span><input type="checkbox" name="ptxz" id="ptxz"/>
                            </div>
                            <div class="QCCreateBox2">
                                <div class="QCCreateHeadWord1">项目描述</div>
                                <div class="QCCreateMain2">
                                    <textarea class="QCCDes" name="description" id="description"></textarea>
                                    <span style="display:none" class="RegMsg">*项目描述不能为空</span>
                                </div>
                            </div>
                            <div class="QCCreateBox2">
                                <div class="QCCreateHeadWord1">其他</div>
                                <div class="QCCreateMain2">
                                    <textarea class="QCCDes" name="other"></textarea>
                                </div>
                            </div>
                            <div class="QCCreateBox2">
                                <div class="QCCreateHeadWord1">图1</div>
                                <div class="QCCreateMain2">
                                    <div class="QCCUploadImg">
                                        <img id="imgPhoto"/>
                                        <div id="divPreview1"></div>
                                    </div>
                                    <input class="QCCUpload" type="file" id="img1"  name="img1" onchange="PreviewImage(this,'imgPhoto','divPreview1');"/>
                                    <span style="display:none" class="RegMsg">*图1不是图片类型</span>
                                </div>
                            </div>
                            <div class="QCCreateBox2">
                                <div class="QCCreateHeadWord1">图2</div>
                                <div class="QCCreateMain2">
                                	<div class="QCCUploadImg">
                                        <img id="imgPhoto2"/>
                                        <div id="divPreview2"></div>
                                    </div>
                                    <input class="QCCUpload" type="file" id="img2"  name="img2" onchange="PreviewImage(this,'imgPhoto2','divPreview2');"/>
                                    <span style="display:none" class="RegMsg">*图2不是图片类型</span>
                                </div>
                            </div>
                            <div class="QCCreateBox2">
                                <div class="QCCreateHeadWord1">图3</div>
                                <div class="QCCreateMain2">
                                	<div class="QCCUploadImg">
	                                    <img id="imgPhoto3"/>
	                                    <div id="divPreview3"></div>
	                                </div>
                                    <input class="QCCUpload" type="file" id="img3" name="img3" onchange="PreviewImage(this,'imgPhoto3','divPreview3');"/>
                                    <span style="display:none" class="RegMsg">*图3不是图片类型</span>
                                </div>
                            </div>
                            </form>
                        </div>
                        <div class="QCCTips">
                            <span>注：除发起机构和平台外，质量控制部分实验室不能看到参加该项目的其他机构名称</span>
                        </div>
                        <div class="QCCSubmitBox">
                            <span class="BtnCss QCCSubmitBtn">发&nbsp;布</span>
                        </div>
                        <div style="clear:both"></div>
                    </div>
                    <div class="NCNewsListContentFoot"></div>
                </div>
                <div class="NCNewsListAds">
                    <div class="NCNewsListAdsBox"><a href="${adLeft.adUrl}" target="_blank"><img src="<%=basePath%>${adLeft.file.path}"/></a></div>
                    <div class="NCNewsListAdsBox"><a href="${adMid.adUrl}" target="_blank"><img src="<%=basePath%>${adMid.file.path}"/></a></div>
                    <div class="NCNewsListAdsBox"><a href="${adRight.adUrl}" target="_blank"><img src="<%=basePath%>${adRight.file.path}"/></a></div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="QCCAlert" style="display:none;">
    <div class="QCCAlertForm">
        <span class="QCCAlertTitle">提&nbsp;示</span>
        <span class="QCCAlertContent">请仔细核对信息，发布后的质量控制将不允许进行更改，如果更改，请联系管理员。</span>
        <div class="QCCBtnGroup">
            <div id="QCCUpload" class="BtnCss QCCBtn">上&nbsp;传</div>
            <div id="QCCCancel" class="BtnCss QCCBtn">取&nbsp;消</div>
        </div>
    </div>
</div>
<%@include file="p_foot.jsp"%>
</body>
<script src="<%=basePath %>portal/js/res/jquery-1.4.2.min.js"></script>
<script src="<%=basePath %>portal/js/res/responsiveslides.min.js"></script>
<script src="<%=basePath %>portal/js/res/zebra_datepicker.src.js"></script>
<script src="<%=basePath %>portal/js/page/base.js"></script>
<script src="<%=basePath %>portal/js/page/qualitycontrollist.js"></script>
<script src="<%=basePath %>portal/js/res/My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.min.js"></script>
<script src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<script src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
<script>
$('#qualityCtrlForm').form({
    onSubmit: function() {
        return $(this).form('validate');
    },
    success: function(data) {
		var mydata = JSON.parse(data);
		switch(mydata.result) {
		case 0:
			window.location="<%=basePath%>qualitycontrol_index.action";
			break;
		case 1:
			$("#projectName").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 2:
			$("#standard").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 3:
		case 4:
			$("#price").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 5:
			$("#beginDate").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 6:
			$("#endDate").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 7:
			$("#feedBackDate").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 8:
			$("#description").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 9:
		case 10:
			$("#img1").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 11:
		case 12:
			$("#img2").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		case 13:
		case 14:
		case 15:
			$("#img3").parent().find(".RegMsg").html(mydata.msg).show();
			break;
		}
	}
});

</script>
</html>